package com.eric.service;
import cn.dev33.satoken.util.SaResult;
import com.eric.domain.dto.MaterialDto;
import com.eric.domain.po.Material;
import com.github.yulichang.base.MPJBaseService;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * <p>
 * 材料表 服务类
 * </p>
 *
 * @author 新哥
 * @since 2024-03-12
 */
public interface IMaterialService extends MPJBaseService<Material> {

    SaResult saveMaterialService(MaterialDto materialDto, MultipartFile[] materialFiles, HttpServletRequest request);

    SaResult getAllByPageService(Integer current, Integer pageSize);

    SaResult getOneByIdService(Integer id);

    SaResult getOneByEncodeService(String encode);

    SaResult modifyOne(MaterialDto materialDto, MultipartFile[] materialFile, HttpServletRequest request, String[] photoList);

    SaResult deleteOneByIdService(Integer id);

    SaResult getByMaterialNameService(String materialName,Integer current,Integer pageSize);

    SaResult getAllMaterialsTermsByMaterialNameService(String materialName);

    SaResult getAllMaterialTerms();

    SaResult getByTypeName(String typeName,Integer orderBy,Integer current, Integer pageSize);

    SaResult getCountsByTypeName(String typeName);

    SaResult getByMultifunctionService(String name, Integer current, Integer pageSize);

    SaResult getCountByMultifunctionNameService(String name);

    void downloadFilesService(String[] files, HttpServletResponse response) throws IOException;

    SaResult modifyMaterialStatusService(Material material);

    SaResult modifyStockTakeNumberService(Material material);

    SaResult getAllService();

    SaResult modifyFinalStockTakeNumberService();
}
